package com.hsteach.web.controller.meeting;

import com.hsteach.common.core.controller.BaseController;
import com.hsteach.common.core.domain.AjaxResult;
import com.hsteach.common.core.page.TableDataInfo;
import com.hsteach.dao.domain.meeting.MeetingSummary;
import com.hsteach.service.meeting.MeetingSummaryService;
import com.hsteach.web.controller.meeting.dto.MeetingSummaryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "会议纪要")
@RestController
@RequestMapping("/meeting/summary")
public class MeetingSummaryController extends BaseController {

    @Resource
    private MeetingSummaryService meetingSummaryService;


    @ApiOperation("查询会议纪要列表")
    @GetMapping("list/{applyId}")
    public TableDataInfo<MeetingSummary> list(@PathVariable("applyId")Long applyId){
        return getDataTable(meetingSummaryService.list(applyId));
    }

    @ApiOperation("新增会议纪要")
    @PostMapping("add")
    public AjaxResult add(@RequestBody MeetingSummaryDto dto){
        return success(meetingSummaryService.add(dto));
    }
}
